package com.dangdi.show.service;

import com.dangdi.show.dao.ShiroDao;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
import java.util.Set;

@Service
@Transactional
public class ShiroService {
    @Resource
    ShiroDao shiroDao;

    //获取所有的商家
    public List<Map> FindAllManagerList() {
        return shiroDao.FindAllManagerList();
    }

    //按照管理员手机号获取角色
    public Set<String> FindManagerRoleByManagerTel(String manager_tel) {
        return shiroDao.FindManagerRoleByManagerTel(manager_tel);
    }

    //按照管理员手机号获取权限
    public Set<String> FindManagerPermissionsByManagerTel(String manager_tel) {
        return shiroDao.FindManagerPermissionsByManagerTel(manager_tel);
    }

    //按照管理员手机号获取管理员信息
    public Map<String, Object> FindManagerByManagerTel(String manager_tel) {
        return shiroDao.FindManagerByManagerTel(manager_tel);
    }


    /////////////////
    //按照管理员手机号获取管理员信息
    public String FindWechatUserByOpenId(String open_id) {
        return shiroDao.FindWechatUserByOpenId(open_id);
    }


}
